package com.ruoyi.service;

import com.ruoyi.domain.TRequestForm;
import com.ruoyi.pojo.dto.*;
import com.ruoyi.pojo.response.AdminApprovalResp;
import com.ruoyi.pojo.response.UserApprovalResp;

import java.util.HashMap;
import java.util.List;

/**
 * 申请表Service接口
 * 
 * @author mzr
 * @date 2023-12-11
 */
public interface ITRequestFormService 
{
    /**
     * 查询申请表
     * 
     * @param id 申请表主键
     * @return 申请表
     */
    public TRequestForm selectTRequestFormById(Long id);

    /**
     * 查询申请表列表
     * 
     * @param tRequestForm 申请表
     * @return 申请表集合
     */
    public List<TRequestForm> selectTRequestFormList(TRequestForm tRequestForm);

    /**
     * 新增申请表
     * 
     * @param tRequestForm 申请表
     * @return 结果
     */
    public int insertTRequestForm(TRequestForm tRequestForm);

    /**
     * 修改申请表
     * 
     * @param tRequestForm 申请表
     * @return 结果
     */
    public int updateTRequestForm(TRequestForm tRequestForm);

    /**
     * 批量删除申请表
     * 
     * @param ids 需要删除的申请表主键集合
     * @return 结果
     */
    public int deleteTRequestFormByIds(Long[] ids);

    /**
     * 删除申请表信息
     * 
     * @param id 申请表主键
     * @return 结果
     */
    public int deleteTRequestFormById(Long id);

    boolean pushApproval(FromDto fromDto,Long userId);

    boolean approveApproval(String auditRemark,Long fromId, Long userId,String files);



    boolean rejectApproval(HashMap<String,Object> dto, Long userId);

    ApprovalDto queryApproval(Long fromId);


    ApprovalDto selectAllUser(Long fromId);


    List<AdminApprovalResp> queryApprovalRecord(String keyword,Long userId,int statusO,int statusT,String startTime,String endTime);

    List<AdminApprovalResp> queryApprovalCopyRecord(String keyword,Long userId,String startTime,String endTime);

    List<UserApprovalResp> queryUserApprovalRecord(String keyword, Long userId,String formName,String startTime,String endTime);

    boolean pushApprovalAgain(PushApprovalAgainDto data, Long userId);


    boolean revocationApprovalPathForm(Long userId, RevocationApprovalFormDto data);

    List<HashMap<String,Object>> selectTRequestFormToExport(ExportRequestFromDto exportRequestFromDto);

}
